<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>分类管理</title>
    <script type='text/javascript' src='http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://127.0.0.1/damai/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
HOST = '<?php echo $GLOBALS['user']['HOST'];?>';
ROOT = '<?php echo $GLOBALS['user']['ROOT'];?>';
WEB = '<?php echo $GLOBALS['user']['WEB'];?>';
URL = '<?php echo $GLOBALS['user']['URL'];?>';
HDPHP = '<?php echo $GLOBALS['user']['HDPHP'];?>';
HDPHPDATA = '<?php echo $GLOBALS['user']['HDPHPDATA'];?>';
HDPHPTPL = '<?php echo $GLOBALS['user']['HDPHPTPL'];?>';
HDPHPEXTEND = '<?php echo $GLOBALS['user']['HDPHPEXTEND'];?>';
APP = '<?php echo $GLOBALS['user']['APP'];?>';
CONTROL = '<?php echo $GLOBALS['user']['CONTROL'];?>';
METH = '<?php echo $GLOBALS['user']['METH'];?>';
GROUP = '<?php echo $GLOBALS['user']['GROUP'];?>';
TPL = '<?php echo $GLOBALS['user']['TPL'];?>';
CONTROLTPL = '<?php echo $GLOBALS['user']['CONTROLTPL'];?>';
STATIC = '<?php echo $GLOBALS['user']['STATIC'];?>';
PUBLIC = '<?php echo $GLOBALS['user']['PUBLIC'];?>';
HISTORY = '<?php echo $GLOBALS['user']['HISTORY'];?>';
HTTPREFERER = '<?php echo $GLOBALS['user']['HTTPREFERER'];?>';
</script>
    <link href='http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/css/bootstrap.min.css' rel='stylesheet' media='screen'>
<script src='http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/js/bootstrap.min.js'></script>
                <!--[if lte IE 6]>
                <link rel="stylesheet" type="text/css" href="http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/ie6/css/bootstrap-ie6.css">
                <![endif]-->
                <!--[if lt IE 9]>
                <script src="http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/js/html5shiv.min.js"></script>
                <script src="http://127.0.0.1/damai/hdphp/hdphp/Extend/Org/bootstrap/js/respond.min.js"></script>
                <![endif]-->
    <script type="text/javascript">
        $(function(){
            $('#add-cate-form').validate({
                'cname' : {
                    rule:{
                        required: true,
                        maxlen:20
                    },
                    error:{
                        required : '分类名称必填',
                        maxlen:'分类名称不能大于20个字符'
                    },
                    message:'分类名称长度 1 到 20 位',
                    success:'填写正确'
                },
                'ctitle' : {
                    rule:{
                        required: true,
                        maxlen:60
                    },
                    error:{
                        required : '分类标题必填',
                        maxlen:'分类标题不能大于60个字符'
                    },
                    message:'分类标题长度 1 到 60 位 ',
                    success:''
                },
                'ckeywords' : {
                    rule:{
                        maxlen:120
                    },
                    error:{
                        maxlen:'分类关键字不能大于120个字符'
                    },
                    message:'分类关键字长度 1 到 120位',
                    success:''
                },
                'cdes' : {
                    rule:{
                        maxlen:255
                    },
                    error:{
                        maxlen:'分类描述不能大于255个字符'
                    },
                    message:'分类描述长度 1 到 255位',
                    success:''
                },
                'csort' : {
                    rule:{
                        num:'1,65535'
                    },
                    error:{
                        num:'分类排序必须为数字且不能大于65535'
                    },
                    message:'请填写1到65535的排序数字',
                    success:''
                },
                'htmldir' : {
                    rule:{
                        regexp:/^[a-zA-Z]{1,50}$/
                    },
                    error:{
                        regexp:'静态目录格式不正确'
                    },
                    message:'请填写1~50位只包含字母数字下划线,分类静态目录 例如：php',
                    success:''
                },
             
                
            })
        })
    </script>
    <link type="text/css" rel="stylesheet" href="http://127.0.0.1/damai/./App/App/Admin/Tpl/Cinema/css/css.css"/>
</head>
<body>
<div class="wrap">
    <div class="title-header">座位管理</div>
    <form action="" method="post" class="form-inline hd-form" id="add-cate-form">
        <table class="table1">
        <tr>
                <th class="w100">所属影院<公司></th>
                <td  class="w100">
                    <span><?php echo P($cinemaname);?></span>
                </td>
                 <td><span id="hd_catename"></span></td>
               
            </tr>
            <tr>
                <th class="w100">名称</th>
                <td  class="w100">
                    <input type="text" name="seatname" class="w200"/> 
                </td>
                <td><span id="hd_catename"></span></td>
            </tr>
            <tr>
                <th class="w100">地址</th>
                <td  class="w100">
                    <input type="text" name="seataddress" class="w200"/> 
                </td>
                <td><span id="hd_catename"></span></td>
            </tr>
           <!--  <tr>
                <th class="w100">票数</th>
                <td  class="w100">
                    <input type="text" name="countticket" class="w200"/> 
                </td>
                <td><span id="hd_catename"></span></td>
            </tr> -->
            <!-- <tr>
                <th class="w100">价格范围</th>
                <td  class="w100">
                    <input type="text" name="pricerange" class="w200"/> 
                </td>
                <td><span id="hd_catename"></span></td>
            </tr> -->
           <!--  <tr>
                <th class="w100">座位数</th>
                <td  class="w100">
                    <input type="text" name="countseat" class="w200"/> 
                </td>
                <td><span id="hd_catename"></span></td>
            </tr> -->
            <tr>
                <th class="w100">座位分布图地址</th>
                <td  class="w100">
                    <input type="text" name="seatpicture" class="w200"/> 
                </td>
                <td><span id="hd_catename"></span></td>
            </tr>
             <tr>
                <th class="w100">是否支持选座</th>
                <td>
                   
                   是<input type="radio" value="1" name="is_seat"  id="no"checked="checked"  />
                   否<input type="radio" value="0" name="is_seat" id="yes" />
                </td>
                <td><span id="hd_catetytle">如不支持选座，可不用填写座位号</span></td>
            </tr>
            </table>
            <table class="table1">
            <tr>
                <th class="w100">座位生成</th>
                <td>
                     <input type="text" name="pai" class="w50"/>排
                     <input type="text" name="lie" class="w50"/>列
                     <a href="javascript:;" style="font-size:12px;font-width:bolder" id="build-seat">生成座位号</a>
                </td>
                <td></td>
            </tr>
            </table>
            <!-- 座位生成 -->
            <script type="text/javascript">
            $(function(){
                    $('#build-seat').click(function() {
                        $('textarea[name=seatsort]').val('');
                        var pai = $('input[name=pai]').val();
                        pai = parseInt(pai)+parseInt(1);
                        var lie = $('input[name=lie]').val();
                        lie = parseInt(lie)+parseInt(1);
                        var seatnum="";
                        var seatnum="";
                        for (var i = 1; i < pai; i++) {
                           
                           for (var v = 1; v < lie; v++) {
                            seat = i+"排"+v+"列"+","
                            seatnum +=seat;
                             $('textarea[name=seatsort]').val(seatnum);
                           };


                        };
                           
                    });
            })



            </script>
            <table class="table1">
            <tr>
                <th class="w100">座位编号</th>
                <td class="w250">
                    <textarea name="seatsort" class="form-control" rows="5"></textarea>
                </td>
                <td><span id="hd_catedes">如1排1号,1排2号</span></td>
            </tr>
            <tr>
                <th class="w100">备注</th>
                <td>
                    <textarea name="remark" class="form-control" rows="5"></textarea>
                </td>
                <td><span id="hd_catedes"></span></td>
            </tr>
            <tr><td></td></tr> 
            <tr><td></td></tr> 
            <tr><td></td></tr> 
            <tr><td></td></tr> 
            <tr><td></td></tr>    
        </table>
        <div class="position-bottom">
            <input type="hidden" name="cinemaid" value="<?php echo $_GET['cinemaid'];?>"/>
            <input type="submit" class="hd-success" value="添加"/>
        </div>
    </form>
</div>
</body>
</html>